import Vue from 'vue'

import 'normalize.css/normalize.css'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.scss'
import api from './api/api'

import App from './App'
import store from './store'
import router from './router'

import '@/icons'
// 路由守卫文件
import '@/router/permission'
import mock from './utils/mock'
import * as filters from './filters' // global filters
import mixins from './mixins/mixins'
import UploadFile from './components/Common/UploadFile.vue'
import md5 from 'js-md5'
import formValidate from './utils/form-validate';

Vue.use(ElementUI)
Vue.component('UploadFile', UploadFile)

Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key])
})
Vue.mixin(mixins)

Vue.config.productionTip = false
Vue.prototype.$api = api
Vue.prototype.$md5 = md5
Vue.prototype.$mock = mock
Vue.prototype.$formValidate = formValidate

new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
})
